import request from '@/utils/request'

export function create(data) {
  return request({
    url: '/ideas/add',
    method: 'post',
    data
  })
}

export function getList(params) {
  return request({
    url: '/ideas/list',
    method: 'get',
    params: params
  })
}



export function info(params) {
  return request({
    url: '/ideas/info',
    method: 'get',
    params: params
  })
}

export function edit(data) {
  return request({
    url: `/ideas/bind`,
    method: 'post',
    data
  })
}

export function Status(data) {
  return request({
    url: '/ideas/statusChange',
    method: 'put',
    data
  })
}

export function topStatus(data) {
  return request({
    url: '/ideas/topChange',
    method: 'put',
    data
  })
}

export function Del(query) {
  return request({
    url: '/ideas/del',
    method: 'delete',
    params: query
  })
}



export function BlobFile(params) {
  return request({
    url: '/ideas/filepath',
    method: 'get',
    params: params,
    // responseType: 'blob'
  })
}

//获取目录列表
export function getAllList(params) {
  return request({
    url: '/directory/alllist',
    method: 'get',
    params: params
  })
}
